/*
 * XML Type:  EOperation
 * Namespace: http://www.eclipse.org/emf/2002/Ecore
 * Java type: org.eclipse.emf.x2002.ecore.EOperation
 *
 * Automatically generated - do not modify.
 */
package org.eclipse.emf.x2002.ecore.impl;
/**
 * An XML EOperation(@http://www.eclipse.org/emf/2002/Ecore).
 *
 * This is a complex type.
 */
public class EOperationImpl extends org.eclipse.emf.x2002.ecore.impl.ETypedElementImpl implements org.eclipse.emf.x2002.ecore.EOperation
{
    private static final long serialVersionUID = 1L;
    
    public EOperationImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName EPARAMETERS$0 = 
        new javax.xml.namespace.QName("", "eParameters");
    private static final javax.xml.namespace.QName EEXCEPTIONS$2 = 
        new javax.xml.namespace.QName("", "eExceptions");
    
    
    /**
     * Gets array of all "eParameters" elements
     */
    public org.eclipse.emf.x2002.ecore.EParameter[] getEParametersArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(EPARAMETERS$0, targetList);
            org.eclipse.emf.x2002.ecore.EParameter[] result = new org.eclipse.emf.x2002.ecore.EParameter[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "eParameters" element
     */
    public org.eclipse.emf.x2002.ecore.EParameter getEParametersArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.eclipse.emf.x2002.ecore.EParameter target = null;
            target = (org.eclipse.emf.x2002.ecore.EParameter)get_store().find_element_user(EPARAMETERS$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "eParameters" element
     */
    public int sizeOfEParametersArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(EPARAMETERS$0);
        }
    }
    
    /**
     * Sets array of all "eParameters" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setEParametersArray(org.eclipse.emf.x2002.ecore.EParameter[] eParametersArray)
    {
        check_orphaned();
        arraySetterHelper(eParametersArray, EPARAMETERS$0);
    }
    
    /**
     * Sets ith "eParameters" element
     */
    public void setEParametersArray(int i, org.eclipse.emf.x2002.ecore.EParameter eParameters)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.eclipse.emf.x2002.ecore.EParameter target = null;
            target = (org.eclipse.emf.x2002.ecore.EParameter)get_store().find_element_user(EPARAMETERS$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(eParameters);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "eParameters" element
     */
    public org.eclipse.emf.x2002.ecore.EParameter insertNewEParameters(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.eclipse.emf.x2002.ecore.EParameter target = null;
            target = (org.eclipse.emf.x2002.ecore.EParameter)get_store().insert_element_user(EPARAMETERS$0, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "eParameters" element
     */
    public org.eclipse.emf.x2002.ecore.EParameter addNewEParameters()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.eclipse.emf.x2002.ecore.EParameter target = null;
            target = (org.eclipse.emf.x2002.ecore.EParameter)get_store().add_element_user(EPARAMETERS$0);
            return target;
        }
    }
    
    /**
     * Removes the ith "eParameters" element
     */
    public void removeEParameters(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(EPARAMETERS$0, i);
        }
    }
    
    /**
     * Gets the "eExceptions" attribute
     */
    public java.util.List getEExceptions()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(EEXCEPTIONS$2);
            if (target == null)
            {
                return null;
            }
            return target.getListValue();
        }
    }
    
    /**
     * Gets (as xml) the "eExceptions" attribute
     */
    public org.eclipse.emf.x2002.ecore.EOperation.EExceptions xgetEExceptions()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.eclipse.emf.x2002.ecore.EOperation.EExceptions target = null;
            target = (org.eclipse.emf.x2002.ecore.EOperation.EExceptions)get_store().find_attribute_user(EEXCEPTIONS$2);
            return target;
        }
    }
    
    /**
     * True if has "eExceptions" attribute
     */
    public boolean isSetEExceptions()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(EEXCEPTIONS$2) != null;
        }
    }
    
    /**
     * Sets the "eExceptions" attribute
     */
    public void setEExceptions(java.util.List eExceptions)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(EEXCEPTIONS$2);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(EEXCEPTIONS$2);
            }
            target.setListValue(eExceptions);
        }
    }
    
    /**
     * Sets (as xml) the "eExceptions" attribute
     */
    public void xsetEExceptions(org.eclipse.emf.x2002.ecore.EOperation.EExceptions eExceptions)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.eclipse.emf.x2002.ecore.EOperation.EExceptions target = null;
            target = (org.eclipse.emf.x2002.ecore.EOperation.EExceptions)get_store().find_attribute_user(EEXCEPTIONS$2);
            if (target == null)
            {
                target = (org.eclipse.emf.x2002.ecore.EOperation.EExceptions)get_store().add_attribute_user(EEXCEPTIONS$2);
            }
            target.set(eExceptions);
        }
    }
    
    /**
     * Unsets the "eExceptions" attribute
     */
    public void unsetEExceptions()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(EEXCEPTIONS$2);
        }
    }
    /**
     * An XML eExceptions(@).
     *
     * This is a list type whose items are org.apache.xmlbeans.XmlAnyURI.
     */
    public static class EExceptionsImpl extends org.apache.xmlbeans.impl.values.XmlListImpl implements org.eclipse.emf.x2002.ecore.EOperation.EExceptions
    {
        private static final long serialVersionUID = 1L;
        
        public EExceptionsImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType, false);
        }
        
        protected EExceptionsImpl(org.apache.xmlbeans.SchemaType sType, boolean b)
        {
            super(sType, b);
        }
    }
}
